package com.henry.c05;

import com.henry.c05.autoconfig.DefaultClass;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class C05AutoConfigApplication {


    public static void main(String[] args) {
        SpringApplication.run(C05AutoConfigApplication.class);
    }


    @Autowired
    DefaultClass klass;

    //自动装配实现打印
    @Bean
    public void question8(){

        System.out.println(klass.getClassName());
    }
}
